
package com.common.utils.classload;

import java.net.URL;
import java.net.URLClassLoader;

/**
 * 自定义URL类加载器,默认双亲委派原则先从父类加载,父加载器加载不到使用子类去加载
 *
 * @author xin.ding
 * @date 2021/5/21 10:28
 */
public class ParentFirstClassLoader extends URLClassLoader {

    /**
     * @param urls
     */
    ParentFirstClassLoader(URL[] urls) {
        this(urls, ParentFirstClassLoader.class.getClassLoader());
    }

    /**
     * @param urls
     * @param parent
     */
    ParentFirstClassLoader(URL[] urls, ClassLoader parent) {
        super(urls, parent);
    }
}
